<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*body > div {
            width: 300px;
            position: relative;
            background-color: rgba(0, 0, 0, 0.3);
            padding: 10px;
        }*/

        body > div {
            width: 300px;
            positon: relative;
            background-color: rgba(0, 0, 0, 0.3);
            padding: 10px;
        }

        /*    body > div > input[type="text"] {
                border: 0;
                padding: 10px 20px;
                width: 260px;
            }*/

        body > div > input[type="text"] {
            border: 0;
            padding:10px 20px;
            width: 260px;
        }

        body > div > img {
            position: absolute;
            right: 40px;
            top: 14px;
        }

        p {
            color: red;
            font-size: 12px;
            margin: 0;
        }
    </style>
</head>
<body>
<div>
    <input type="text" placeholder="请输入用户名">
    <img src="http://doc.vrd.net.cn/tstore_v1/images/login/yhm.png" alt="">
    <p>用户名不能为空</p>
</div>
</body>
</html>